package at.codebase.db.entities;

import com.googlecode.objectify.Key;
import com.googlecode.objectify.annotation.Entity;
import com.googlecode.objectify.annotation.Id;
import com.googlecode.objectify.annotation.Index;

/**
 * @author Daniel Marth <danielmarth@gmx.at>
 */
@Entity
public class ELogMessage {

	@Id
	private Long id;
	@Index
	private Key<EUser> user;
	@Index
	private int type;
	@Index
	private long timestamp;
	private String text;
	
	public ELogMessage() {
	}
	
	public ELogMessage(final Key<EUser> user, final int type, final String text) {
		this.user = user;
		this.type = type;
		this.text = text;
		this.timestamp = System.currentTimeMillis();
	}

	public Long getId() {
		return id;
	}

	public Key<EUser> getUser(){
		return user;
	}
	
	public int getType() {
		return type;
	}

	public String getText() {
		return text;
	}
	
	public long getTimestamp() {
		return timestamp;
	}
	
}
